#include "CApp.h"
 
void CApp::OnEvent(SDL_Event* Event) {
    CEvent::OnEvent(Event);
}
 
void CApp::OnExit() {
    Running = false;
}

/*void CApp::OnKeyDown(SDLKey sym, SDLMod mod, Uint16 unicode) {
    switch(sym) {
        case SDLK_UP:      CCamera::CameraControl.OnMove( 0,  5); break;
        case SDLK_DOWN:  CCamera::CameraControl.OnMove( 0, -5); break;
        case SDLK_LEFT:  CCamera::CameraControl.OnMove( 5,  0); break;
        case SDLK_RIGHT: CCamera::CameraControl.OnMove(-5,  0); break;
 
        default: {
        }
    }
}*/

void CApp::OnKeyDown(SDLKey sym, SDLMod mod, Uint16 unicode) {
    switch(sym) {
        case SDLK_LEFT: {
            Player.MoveLeft = true;
            break;
        }
 
        case SDLK_RIGHT: {
            Player.MoveRight = true;
            break;
        }

		case SDLK_SPACE: {
			Player.Jump();
			break;
		}

		case SDLK_UP: {
		}
 
        default: {
        }
    }
}
 
void CApp::OnKeyUp(SDLKey sym, SDLMod mod, Uint16 unicode) {
    switch(sym) {
        case SDLK_LEFT: {
            Player.MoveLeft = false;
            break;
        }
 
        case SDLK_RIGHT: {
            Player.MoveRight = false;
            break;
        }

	    case SDLK_UP: {
        }
 
        default: {
        }
    }
}